package cn.s1995.sloth.bizs.entity;

import cn.s1995.sloth.bizs.entity.base.BaseEntity;
import cn.s1995.sloth.common.core.convert.JoinUrlPrefixConvert;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.List;

/**
 * demo
 *
 * @author Lex
 * @date 2023-12-22 18:27:04
 */
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "demo")
@TableName(value = "biz_demo", autoResultMap = true)
public class Demo extends BaseEntity {


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "ID")
    private Long id;

	/**
	* 用户名
	*/
    @Schema(description = "用户名")
    private String username;

	/**
	* 密码
	*/
    @Schema(description = "密码")
    private String password;

	/**
	* 状态: 1.启用 0.禁用
	*/
    @Schema(description = "状态: 1.启用 0.禁用")
    private Integer state;

	/**
	* 性别：0.未知 1.男 2.女 3.其他
	*/
    @Schema(description = "性别：0.未知 1.男 2.女 3.其他")
    private Integer gender;

	/**
	* 爱好
	*/
    @Schema(description = "爱好")
    private String hobby;

	/**
	* 年龄
	*/
    @Schema(description = "年龄")
    private Integer age;

	/**
	* 金额
	*/
    @Schema(description = "金额")
    private BigDecimal amount;

	/**
	* 图片
	*/
    @Schema(description = "图片")
    private String pic;

	/**
	 * 图片集合
	 */
	@Schema(description = "图片集合")
	@TableField(typeHandler = JacksonTypeHandler.class)
	@JsonSerialize(using = JoinUrlPrefixConvert.class)
	private List<String> pics;

	/**
	* 内容
	*/
    @Schema(description = "内容")
    private String content;

	/**
	* 删除标识
	*/
	@TableLogic
	@TableField
    @Schema(description = "删除标识", hidden = true)
    private Boolean delFlag;
}
